package com.zqxx.examine.management.persistence;

import java.util.List;

import org.apache.ibatis.annotations.Param;

import com.zqxx.examine.common.utils.Page;
import com.zqxx.examine.model.user.Department;
import com.zqxx.examine.model.user.Group;
import com.zqxx.examine.model.user.Role;
import com.zqxx.examine.model.user.User;

public abstract interface UserMapper
{
  public abstract User getUserByName(String paramString);
  
  public abstract int insertUser(User paramUser);
  
  public abstract void updateUser(@Param("user") User paramUser, @Param("oldpassword") String paramString);
  
  public abstract List<User> getUserListByRoleId(@Param("roleId") int paramInt, @Param("page") Page<User> paramPage);
  
  public abstract void grantUserRole(@Param("userId") int paramInt1, @Param("roleId") int paramInt2);
  
  public abstract List<Group> getGroupListByUserId(@Param("userId") int paramInt, @Param("page") Page<Group> paramPage);
  
  public abstract void addGroup(@Param("group") Group paramGroup);
  
  public abstract void addUserGroup(@Param("userId") int paramInt1, @Param("groupId") int paramInt2);
  
  public abstract void updateGroup(@Param("groupId") int paramInt, @Param("groupName") String paramString);
  
  public abstract List<Role> getRoleList();
  
  public abstract void changeUserStatus(@Param("array") List<Integer> paramList, @Param("enabled") boolean paramBoolean);
  
  public abstract void deleteGroup(int paramInt);
  
  public abstract void deleteUserGroup(@Param("userId") int paramInt1, @Param("groupId") int paramInt2, @Param("managerId") int paramInt3);
  
  public abstract List<User> getUserListByGroupIdAndParams(@Param("groupId") int paramInt, @Param("authority") String paramString1, @Param("searchStr") String paramString2, @Param("page") Page<User> paramPage);
  
  public abstract List<User> getUserByNames(@Param("array") String[] paramArrayOfString, @Param("roleId") int paramInt);
  
  public abstract void addUsers2Group(@Param("array") List<Integer> paramList, @Param("groupId") int paramInt);
  
  public abstract List<Department> getDepList(@Param("page") Page<Department> paramPage);
  
  public abstract void addDep(Department paramDepartment);
  
  public abstract void updateDep(Department paramDepartment);
  
  public abstract void deleteDep(int paramInt);
  
  public abstract void addUser2Dep(@Param("userId") int paramInt1, @Param("depId") int paramInt2);
  
  public abstract void deleteUser2Dep(int paramInt);
  
  public abstract List<User> getUserListByGroupIdList(@Param("array") List<Integer> paramList, @Param("page") Page<User> paramPage);
}
